package org.robby.hbase;

import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.hbase.HBaseConfiguration;
import org.apache.hadoop.hbase.client.HTableInterface;
import org.apache.hadoop.hbase.client.HTablePool;
import org.apache.hadoop.hbase.client.Put;

public class RowLockTest {

	/**
	 * @param args
	 */
	public static void main(String[] args) throws Exception {
		Configuration conf = HBaseConfiguration.create();
		conf.set("hbase.zookeeper.quorum", "192.168.1.90");// 连接到远程服务上
		HTablePool tp = new HTablePool(conf, 1024);
		HTableInterface test =  tp.getTable("test");
		// byte[] row = Bytes.toBytes("row1");
		System.out.println("begin");
		Put put = new Put("row1".getBytes());
		put.add("col".getBytes(), "info".getBytes(), "test1".getBytes());
		test.put(put);
		System.out.println("end");
		test.close();

	}

}
